package com.feidee.bigdata.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.client.RestTemplate;

/**
 * @Author:CHQ
 * @Date:2020/4/13 18:12
 * @Description
 */
@RestController
public class ConsumerController {

    public static final String INVOKE_URL = "http://payment-service/test";

    @Autowired
    private RestTemplate restTemplate;

    @RequestMapping("/consumer")
    public String consumer() {
        return restTemplate.getForObject(INVOKE_URL, String.class);
    }

}
